<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title><%= title %></title>
<link href="./Wopop_files/style_log.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="./Wopop_files/style.css">
<link rel="stylesheet" type="text/css" href="./Wopop_files/userpanel.css">
</head>
<body class="login" mycollectionplug="bind">
<div class="login_m">
<div class="login_boder">
<div class="login_padding" id="login_model">
  <h2>USERNAME</h2>
  <label>
    <input type="text" id="username" class="txt_input txt_input2" onfocus="if (value ==&#39;Your name&#39;){value =&#39;&#39;}" onblur="if (value ==&#39;&#39;){value=&#39;Your name&#39;}" >
  </label>
  <h2>PASSWORD</h2>
  <label>
    <input type="password" id="password"  class="txt_input" onfocus="if (value ==&#39;******&#39;){value =&#39;&#39;}" onblur="if (value ==&#39;&#39;){value=&#39;******&#39;}" >
  </label>
  <div class="rem_sub">
    <label>
      <input type="submit" id="submit"  value="SIGN-IN">
    </label>
  </div>
</div>
<div id="forget_model" class="login_padding" style="display:none">
<br>
</div>
</div>
 <br> <br>
</body>
</html>
<script src = "../assets/js/jquery-1.10.2.js"></script>
<script>
		$(function(){
		$("#submit").click(function(){
			var username = document.getElementById("username").value;
			var password = document.getElementById("password").value;
    	  $.ajax({
	            url: 'login_fun/login_fun',
	            data: {"username": username,
	            "password":password,
	            },
	            dataType: 'json',
	            type: 'post',
	            success: function (jsondata) {
	            	if(jsondata.mes === "nobody")
	            	{
	            		console.log(jsondata.mes);
	            		    alert("登录失败");
	            	}
	            	else
	            	{
	            		window.location="Lib_libmanage.html";
	            	}
	            	
	            }
	        })
		});
		
	});
</script>
<script>
	window.onload = function()
	{
		alert("You Need Login to manage and view");
	}
</script>